3.179 \(\int \frac{\sec ^2(e+f x)}{\sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))} \, dx\)

Optimal. Leaf size=81 \[ \frac{\cot (e+f x) \sqrt{a \sec (e+f x)+a}}{a c f}-\frac{\tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{2} \sqrt{a} c f} \]

[Out]

-(ArcTan[(Sqrt[a]*Tan[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])]/(Sqrt[2]*Sqrt[a]*c*f)) + (Cot[e + f*x]*Sqr
t[a + a*Sec[e + f*x]])/(a*c*f)

________________________________________________________________________________________

Rubi [A]  time = 0.231719, antiderivative size = 116, normalized size of antiderivative = 1.43, number of steps used = 4, number of rules used = 4, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {3964, 78, 63, 208} \[ -\frac{\tan (e+f x)}{f \sqrt{a \sec (e+f x)+a} (c-c \sec (e+f x))}-\frac{\tan (e+f x) \tanh ^{-1}\left (\frac{\sqrt{c-c \sec (e+f x)}}{\sqrt{2} \sqrt{c}}\right )}{\sqrt{2} \sqrt{c} f \sqrt{a \sec (e+f x)+a} \sqrt{c-c \sec (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^2/(Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])),x]

[Out]

-(Tan[e + f*x]/(f*Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x]))) - (ArcTanh[Sqrt[c - c*Sec[e + f*x]]/(Sqrt[2]
*Sqrt[c])]*Tan[e + f*x])/(Sqrt[2]*Sqrt[c]*f*Sqrt[a + a*Sec[e + f*x]]*Sqrt[c - c*Sec[e + f*x]])

Rule 3964

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[(a*c*g*Cot[e + f*x])/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[c + d*Csc[e + f*x
]]), Subst[Int[(g*x)^(p - 1)*(a + b*x)^(m - 1/2)*(c + d*x)^(n - 1/2), x], x, Csc[e + f*x]], x] /; FreeQ[{a, b,
 c, d, e, f, g, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f,
 n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ
[p, n]))))

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sec ^2(e+f x)}{\sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))} \, dx &=-\frac{(a c \tan (e+f x)) \operatorname{Subst}\left (\int \frac{x}{(a+a x) (c-c x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt{a+a \sec (e+f x)} \sqrt{c-c \sec (e+f x)}}\\ &=-\frac{\tan (e+f x)}{f \sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))}+\frac{(a \tan (e+f x)) \operatorname{Subst}\left (\int \frac{1}{(a+a x) \sqrt{c-c x}} \, dx,x,\sec (e+f x)\right )}{2 f \sqrt{a+a \sec (e+f x)} \sqrt{c-c \sec (e+f x)}}\\ &=-\frac{\tan (e+f x)}{f \sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))}-\frac{(a \tan (e+f x)) \operatorname{Subst}\left (\int \frac{1}{2 a-\frac{a x^2}{c}} \, dx,x,\sqrt{c-c \sec (e+f x)}\right )}{c f \sqrt{a+a \sec (e+f x)} \sqrt{c-c \sec (e+f x)}}\\ &=-\frac{\tan (e+f x)}{f \sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))}-\frac{\tanh ^{-1}\left (\frac{\sqrt{c-c \sec (e+f x)}}{\sqrt{2} \sqrt{c}}\right ) \tan (e+f x)}{\sqrt{2} \sqrt{c} f \sqrt{a+a \sec (e+f x)} \sqrt{c-c \sec (e+f x)}}\\ \end{align*}

Mathematica [A]  time = 0.473784, size = 73, normalized size = 0.9 \[ -\frac{\cot \left (\frac{1}{2} (e+f x)\right ) \left (\sqrt{2} \sqrt{\sec (e+f x)-1} \tan ^{-1}\left (\frac{\sqrt{\sec (e+f x)-1}}{\sqrt{2}}\right )-2\right )}{2 c f \sqrt{a (\sec (e+f x)+1)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^2/(Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])),x]

[Out]

-(Cot[(e + f*x)/2]*(-2 + Sqrt[2]*ArcTan[Sqrt[-1 + Sec[e + f*x]]/Sqrt[2]]*Sqrt[-1 + Sec[e + f*x]]))/(2*c*f*Sqrt
[a*(1 + Sec[e + f*x])])

________________________________________________________________________________________

Maple [B]  time = 0.238, size = 204, normalized size = 2.5 \begin{align*} -{\frac{1}{2\,fca \left ( \left ( \cos \left ( fx+e \right ) \right ) ^{2}-1 \right ) }\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}} \left ( \left ( \cos \left ( fx+e \right ) \right ) ^{2}\ln \left ( -{\frac{1}{\sin \left ( fx+e \right ) } \left ( -\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) +\cos \left ( fx+e \right ) -1 \right ) } \right ) \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}+2\,\cos \left ( fx+e \right ) \sin \left ( fx+e \right ) -\ln \left ( -{\frac{1}{\sin \left ( fx+e \right ) } \left ( -\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) +\cos \left ( fx+e \right ) -1 \right ) } \right ) \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^2/(c-c*sec(f*x+e))/(a+a*sec(f*x+e))^(1/2),x)

[Out]

-1/2/c/f/a*(1/cos(f*x+e)*a*(1+cos(f*x+e)))^(1/2)*(cos(f*x+e)^2*ln(-(-(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(
f*x+e)+cos(f*x+e)-1)/sin(f*x+e))*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)+2*cos(f*x+e)*sin(f*x+e)-ln(-(-(-2*cos(f*
x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)+cos(f*x+e)-1)/sin(f*x+e))*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2))/(cos(f*x
+e)^2-1)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\int \frac{\sec \left (f x + e\right )^{2}}{\sqrt{a \sec \left (f x + e\right ) + a}{\left (c \sec \left (f x + e\right ) - c\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2/(c-c*sec(f*x+e))/(a+a*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

-integrate(sec(f*x + e)^2/(sqrt(a*sec(f*x + e) + a)*(c*sec(f*x + e) - c)), x)

________________________________________________________________________________________

Fricas [A]  time = 0.549708, size = 676, normalized size = 8.35 \begin{align*} \left [\frac{\sqrt{2} a \sqrt{-\frac{1}{a}} \log \left (\frac{2 \, \sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt{-\frac{1}{a}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, \cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 4 \, \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{4 \, a c f \sin \left (f x + e\right )}, \frac{\sqrt{2} \sqrt{a} \arctan \left (\frac{\sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 2 \, \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{2 \, a c f \sin \left (f x + e\right )}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2/(c-c*sec(f*x+e))/(a+a*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

[1/4*(sqrt(2)*a*sqrt(-1/a)*log((2*sqrt(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sqrt(-1/a)*cos(f*x + e)*sin(
f*x + e) + 3*cos(f*x + e)^2 + 2*cos(f*x + e) - 1)/(cos(f*x + e)^2 + 2*cos(f*x + e) + 1))*sin(f*x + e) + 4*sqrt
((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e))/(a*c*f*sin(f*x + e)), 1/2*(sqrt(2)*sqrt(a)*arctan(sqrt(2)*sq
rt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e)))*sin(f*x + e) + 2*sqrt((a*cos(f*x +
e) + a)/cos(f*x + e))*cos(f*x + e))/(a*c*f*sin(f*x + e))]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \frac{\int \frac{\sec ^{2}{\left (e + f x \right )}}{\sqrt{a \sec{\left (e + f x \right )} + a} \sec{\left (e + f x \right )} - \sqrt{a \sec{\left (e + f x \right )} + a}}\, dx}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**2/(c-c*sec(f*x+e))/(a+a*sec(f*x+e))**(1/2),x)

[Out]

-Integral(sec(e + f*x)**2/(sqrt(a*sec(e + f*x) + a)*sec(e + f*x) - sqrt(a*sec(e + f*x) + a)), x)/c

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2/(c-c*sec(f*x+e))/(a+a*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

Timed out